package br.com.fogas.database.dao.impl;

import java.sql.SQLException;

import com.j256.ormlite.dao.BaseDaoImpl;
import com.j256.ormlite.support.ConnectionSource;

import br.com.fogas.database.dao.IConfigDao;
import br.com.fogas.database.entidade.Config;
import br.com.fogas.modelo.Configuracao;

public class ConfigDao extends BaseDaoImpl<Config, Integer> implements IConfigDao{
	
	public ConfigDao(ConnectionSource connectionSource) throws SQLException {
		super(connectionSource, Config.class);
	}

	@Override
	public void sincronizar(Configuracao configuracao) throws SQLException {
		Config config = new Config(configuracao);
		create(config);
	}
}
